{include file='public:header-css'/}
<body>
<div class="lyear-layout-web">
    <div class="lyear-layout-container">
        <!--左侧导航-->
        {include file='public:left-menu'/}
        <!--End 左侧导航-->
        <!--头部信息-->
        {include file='public:nav-header' title="系统管理" subTitle="系统设置"/}
        <!--End 头部信息-->

        <!--页面主要内容-->
        <main class="lyear-layout-content">

            <div class="container-fluid">
                <div class="row">
                    <div class="col-lg-12">
                        <div class="card">
                            <ul class="nav nav-tabs page-tabs">
                                {volist name="$group_list" id="group"}
                                <li class="{$key==$inc_type ?'active':''}"><a href="{:url('System/index',['inc_type'=>$key])}">{$group}</a></li>
                                {/volist}
                            </ul>
                            <div class="tab-content" style="padding: 0">
                                <div class="tab-pane active">
                                    <form action="" method="post" class="edit-form">
                                        <div class="card-header form-header"><h4>团队分红、加权分红相关设置</h4></div>
                                        <div class="form-info">
                                            <div class="form-group">
                                                <div class="row">
                                                    <div class="col-md-6">
                                                        <label>团队分红时间</label>
                                                        <select style="display: block;width: 100%;" class="input-group-select" name="td_fh_time">
                                                            {for start="1" end="32"}
                                                            <option value="{$i}" {if $config.td_fh_time==$i}selected{/if}>{$i}号</option>
                                                            {/for}
                                                        </select>
                                                        <span class="help">团队分红时间<i class="text-red">请务必正确设置</i></span>
                                                    </div>
                                                    <div class="col-md-6">
                                                        <label>加权分红时间</label>
                                                        <select style="display: block;width: 100%;" class="input-group-select" name="jq_fh_time">
                                                            {for start="1" end="32"}
                                                            <option value="{$i}" {if $config.jq_fh_time==$i}selected{/if}>{$i}号</option>
                                                            {/for}
                                                        </select>
                                                        <span class="help">加权分红时间<i class="text-red">请务必正确设置</i></span>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="card-header form-header"><h4>交易相关设置</h4></div>
                                        <div class="form-info">
                                            <div class="form-group">
                                                <div class="row">
                                                    <div class="col-md-6">
                                                        <label for="deal_recycle_time">回收时间</label>
                                                        <input class="form-control" type="text" id="deal_recycle_time" name="deal_recycle_time"
                                                               value="{$config.deal_recycle_time}" placeholder="请输入回收时间">
                                                        <span class="help">超出多长时间的交易系统回收 单位为小时<i class="text-red">请务必正确设置</i></span>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="card-header form-header"><h4>储备金相关设置</h4></div>
                                        <div class="form-info">
                                            <div class="form-group">
                                                <div class="row">
                                                    <div class="col-md-6">
                                                        <label for="cbj_bl">赠送比例</label>
                                                        <input class="form-control" type="text" id="cbj_bl" name="cbj_bl"
                                                               value="{$config.cbj_bl}" placeholder="请输入赠送比例">
                                                        <span class="help">赠送认养金额的多少倍<i class="text-red">请务必正确设置</i></span>
                                                    </div>
                                                    <div class="col-md-6">
                                                        <label for="cbj_sf_jifen_bl">积分比例</label>
                                                        <input class="form-control" type="text" id="cbj_sf_jifen_bl" name="cbj_sf_jifen_bl"
                                                               value="{$config.cbj_sf_jifen_bl}" placeholder="请输入积分比例">
                                                        <span class="help">储备金释放 积分所占比例<i class="text-red">请务必正确设置</i></span>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="form-info">
                                            <div class="form-group">
                                                <input type="hidden" name="inc_type" value="{$inc_type}">
                                                <button type="button" class="btn-theme submit-btn">确定</button>
                                            </div>
                                        </div>
                                    </form>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </main>
        <!--End 页面主要内容-->
    </div>
</div>
<style>
    .form-info{
        padding: 10px 24px;
    }
</style>
<script type="text/javascript">
    $(function () {
        $('.submit-btn').on('click',function () {
            var url = "{:url('System/handle')}";
            var data = $('.edit-form').serialize();
            public_ajax(url,data,function (res) {
                if (res.code == 1) {
                    showSuccessMsg(res.msg);
                } else {
                    showErrorMsg(res.msg);
                }
            })
        })
    });
</script>
</body>
</html>
